<template>
  <div>
    <template v-if="numData">
      <el-table
        :data="numData.results"
        :stripe = true
        style="width: 100%">
        <el-table-column
          type="index"
          label="编号"
          align="center" >
        </el-table-column>
        <el-table-column
          prop="shore_value"
          label="店铺名称"
          align="center" >
        </el-table-column>
        <el-table-column
          prop="count"
          label="店铺总数"
          align="center" >
        </el-table-column>
        <el-table-column
          v-if=" numtype == 1"
          label="删除警示"
          align="center" >
          <template slot-scope="scope">
            <el-tag
              :type="scope.row.count >= 50 ? 'danger' : 'success'"
              disable-transitions effect="dark">{{scope.row.count}}</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </template>
    
  </div>
</template>

<script>
import httpApi from '@/http';

  export default {
    props:{
      numtype:Number
    },
    data(){
      return{
         numData:'',
      }
    },
    mounted(){
      let params = {type: this.numtype}
      httpApi.complaintApi.listComplaintNum(params).then(res =>{
          // console.log(res);
          this.numData = res.data
      })
    }
  }
</script>

<style lang="scss" scoped>

</style>